<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>SvcCallback</title>
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="SvcCallback";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../index.html?mmj/svc/SvcCallback.html" target="_top">Frames</a></li>
<li><a href="SvcCallback.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">mmj.svc</div>
<h2 title="Interface SvcCallback" class="title">Interface SvcCallback</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="strong">SvcCallback</span></pre>
<div class="block">Interface for using mmj2 as a service.
 <p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../mmj/svc/SvcCallback.html#go(mmj.lang.Messages, mmj.util.OutputBoss, mmj.lang.LogicalSystem, mmj.verify.VerifyProofs, mmj.verify.Grammar, mmj.lang.WorkVarManager, mmj.pa.ProofAsstPreferences, mmj.pa.ProofAsst, mmj.tl.TlPreferences, mmj.tl.TheoremLoader, java.io.File, java.util.Map)">go</a></strong>(<a href="../../mmj/lang/Messages.html" title="class in mmj.lang">Messages</a>&nbsp;messages,
  <a href="../../mmj/util/OutputBoss.html" title="class in mmj.util">OutputBoss</a>&nbsp;outputBoss,
  <a href="../../mmj/lang/LogicalSystem.html" title="class in mmj.lang">LogicalSystem</a>&nbsp;logicalSystem,
  <a href="../../mmj/verify/VerifyProofs.html" title="class in mmj.verify">VerifyProofs</a>&nbsp;verifyProofs,
  <a href="../../mmj/verify/Grammar.html" title="class in mmj.verify">Grammar</a>&nbsp;grammar,
  <a href="../../mmj/lang/WorkVarManager.html" title="class in mmj.lang">WorkVarManager</a>&nbsp;workVarManager,
  <a href="../../mmj/pa/ProofAsstPreferences.html" title="class in mmj.pa">ProofAsstPreferences</a>&nbsp;proofAsstPreferences,
  <a href="../../mmj/pa/ProofAsst.html" title="class in mmj.pa">ProofAsst</a>&nbsp;proofAsst,
  <a href="../../mmj/tl/TlPreferences.html" title="class in mmj.tl">TlPreferences</a>&nbsp;tlPreferences,
  <a href="../../mmj/tl/TheoremLoader.html" title="class in mmj.tl">TheoremLoader</a>&nbsp;theoremLoader,
  java.io.File&nbsp;svcFolder,
  java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;svcArgs)</code>
<div class="block">Method go is called by mmj2 after initialization and a RunParm command is
 encountered triggering a SvcCallback.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="go(mmj.lang.Messages, mmj.util.OutputBoss, mmj.lang.LogicalSystem, mmj.verify.VerifyProofs, mmj.verify.Grammar, mmj.lang.WorkVarManager, mmj.pa.ProofAsstPreferences, mmj.pa.ProofAsst, mmj.tl.TlPreferences, mmj.tl.TheoremLoader, java.io.File, java.util.Map)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>go</h4>
<pre>void&nbsp;go(<a href="../../mmj/lang/Messages.html" title="class in mmj.lang">Messages</a>&nbsp;messages,
      <a href="../../mmj/util/OutputBoss.html" title="class in mmj.util">OutputBoss</a>&nbsp;outputBoss,
      <a href="../../mmj/lang/LogicalSystem.html" title="class in mmj.lang">LogicalSystem</a>&nbsp;logicalSystem,
      <a href="../../mmj/verify/VerifyProofs.html" title="class in mmj.verify">VerifyProofs</a>&nbsp;verifyProofs,
      <a href="../../mmj/verify/Grammar.html" title="class in mmj.verify">Grammar</a>&nbsp;grammar,
      <a href="../../mmj/lang/WorkVarManager.html" title="class in mmj.lang">WorkVarManager</a>&nbsp;workVarManager,
      <a href="../../mmj/pa/ProofAsstPreferences.html" title="class in mmj.pa">ProofAsstPreferences</a>&nbsp;proofAsstPreferences,
      <a href="../../mmj/pa/ProofAsst.html" title="class in mmj.pa">ProofAsst</a>&nbsp;proofAsst,
      <a href="../../mmj/tl/TlPreferences.html" title="class in mmj.tl">TlPreferences</a>&nbsp;tlPreferences,
      <a href="../../mmj/tl/TheoremLoader.html" title="class in mmj.tl">TheoremLoader</a>&nbsp;theoremLoader,
      java.io.File&nbsp;svcFolder,
      java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;svcArgs)</pre>
<div class="block">Method go is called by mmj2 after initialization and a RunParm command is
 encountered triggering a SvcCallback.
 <p>
 The "mmj2 Service" feature adds a new "svc" package to mmj2 and provides
 a foundation for other, non-mmj2 code to access Metamath data and mmj2
 facilities. The primary use envisioned is extracting Metamath data, as
 the mmj2 Service feature provides easy access to the critical ingredient:
 formula parse trees!
 <p>
 Access to mmj2 facilities is made available for "caller" and "callee"
 programs. In both scenarios the BatchMMJ2 program is used to initialize
 mmj2 with a loaded .mm file which is validated, parsed, etc. Callers
 actually call BatchMMJ2 passing a "SvcCallback" object which is called by
 mmj2 once initialization is complete (when the "SvcCall" RunParm is
 processed.) "Callee" programs simply write a class which implements the
 SvcCallback interface -- just as "caller" programs do -- but instead of
 directly calling BatchMMJ2, the user specifies the name of their
 SvcCallback- implementing class via a "SvcCallback" RunParm.
 <p>
 Whether accessing mmj2 as a "caller" or "callee", complete access to
 mmj2's main facilities is provided in the SvcCallback.go interface
 method. The "go()" method is passed references to the biggie mmj2
 objects, including ProofAsst, Grammar, VerifyProofs, etc.
 <p>
 Within the SvcCallback.go() method the user-code can execute calls to
 mmj2 methods but must single-thread the accesses as mmj2 is not, in
 general, written for total multi- threaded access throughout (some code
 could be multi-threaded but not all.)
 <p>
 When finished accessing the mmj2 Services, the user-code simply needs to
 execute a "return" from the SvcCallback.go() method.
 <p>
 New RunParms added to mmj2 for use with BatchMMJ2 (see mmj.util.SvcBoss)
 are SvcFolder, SvcCallbackClass, SvcArg, and SvcCall. The SrvArg RunParm
 provides a way for the user-code to obtain Key-Value parameter pairs via
 the input RunParms file; they are loaded by BatchMMJ2 (with minimal
 validation) into a HashMap and passed via the SvcCallback.go() method.
 <p>
 More information about these new RunParms is provided in the
 mmj2jar\AnnotatedRunParms.txt documentation file.
 <p>
 Review sample code and (w/"compile and go" .bat jobs) in
 
 <pre>
     doc\mmj2Service
 </pre>
 
 Sample "callee" and "caller" mode programs are at:
 
 <pre>
     \doc\mmj2Service\TSvcCallbackCallee.java
     \doc\mmj2Service\TSvcCallbackCaller.java
 </pre>
 
 Note: In "callee" mode, if a "fatal" or severe error is encountered,
 triggering an IllegalArgumentException will instantly terminate the mmj2
 process.
 <p>
 Likewise, in "caller" mode "fatal" errors can result during start-up,
 typically resulting in IllegalArgumentException errors being thrown, and
 then caught by <a href="../../mmj/util/BatchFramework.html" title="class in mmj.util"><code>BatchFramework</code></a> and resulting ultimately in a
 non-zero return-code from
 <a href="../../mmj/util/BatchMMJ2.html#generateSvcCallback(java.lang.String[], mmj.svc.SvcCallback)">BatchMMJ2.generateSvcCallback(String[],SvcCallback)</a>. So...if
 the "caller" mode program gets a non-zero returncode from the
 BatchMMJ2.generateSvcCallback() call then that means that either a) mmj2
 had a "fatal" error during start-up, or b) that the SvcCallback was
 triggered, and one of the user programs threw an exception, such as
 IllegalArgumentException, which flowed back to mmj2 and caused the
 non-zero return-code.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>messages</code> - mmj.lang.Messages object.</dd><dd><code>outputBoss</code> - mmj.util.OutputBoss</dd><dd><code>logicalSystem</code> - mmj.lang.LogicalSystem</dd><dd><code>verifyProofs</code> - mmj.verify.VerifyProofs</dd><dd><code>grammar</code> - mmj.verify.Grammar</dd><dd><code>workVarManager</code> - mmj.lang.WorkVarManager</dd><dd><code>proofAsstPreferences</code> - mmj.pa.ProofAsstPreferences</dd><dd><code>proofAsst</code> - mmj.pa.ProofAsst</dd><dd><code>tlPreferences</code> - mmj.tl.TlPreferences</dd><dd><code>theoremLoader</code> - mmj.tl.TheoremLoader</dd><dd><code>svcFolder</code> - home Folder for use by Svc (specified via RunParm).</dd><dd><code>svcArgs</code> - Map of Svc key/value pair arguments (specified via
            RunParm).</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../index.html?mmj/svc/SvcCallback.html" target="_top">Frames</a></li>
<li><a href="SvcCallback.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
